package ces.lawsuit.util;

import java.util.Date;



public class AppUtil {
	
	private static long currentId = 0;
	/**
	 * 返回一个唯一标志数字，可用作主键值
	 * 
	 * @return
	 */
	public synchronized static String generateId() {
		long id = new Date().getTime();
		if (currentId < id) {
			AppUtil.currentId = id;
		} else {
			currentId++;
		}
		return Long.toString(currentId);
	}
}
